Now we need to patch host.rs to add chain_api and update HostState to include events, block_number, timestamp. Then register the functions in lib.rs and add a new test for events.